How to make the Angry Birds "shot arch" dotted line? [duplicate]

Posted by unexpected62 on Game Development See other posts from Game Development or by unexpected62
Published on 2013-06-23T23:03:07Z Indexed on 2013/06/24 16:39 UTC
Read the original article Hit count: 307

Filed under:
|
|

This question already has an answer here:

I am making a game that includes 2D projectile flight paths like that of Angry Birds. Angry Birds employs the notion that a previous shot is shown with a dotted line "arch" showing the player where that last shot went. I think recording that data is simple enough once a shot is fired, but in my game, I want to show it preemptively, ie: before the shot. How would I go about calculating this dotted line? The other caveat is I have wind in my game. How can you determine a projectile preemptively when wind will affect it too? This seems like a pretty tough problem. My wind right now just applies a constant force every step of animation in the direction of the wind flow. I'm using Box2D and AndEngine if it matters.

© Game Development or respective owner

Related posts about physics

Related posts about box2d